import request from '@/utils/request'
//用户
export const userPage = (current, size, params) => {
  return request({
    url: '/jumpcliuser/page',
    method: 'get',
    params: {
      ...params,
      current,
      size,
    },
  });
};
//1.保存
export const userSave = (rows) => {
  return request({
    url: '/jumpcliuser',
    method: 'post',
    data: rows,
  });
};
//2.删除
export const userRemove = (id) => {
  return request({
    url: `/jumpcliuser/${id}`,
    method: 'delete',
  })
}
//3.修改
export const userUpdate = (rows) => {
  return request({
    url: '/jumpcliuser',
    method: 'put',
    data: rows,
  });
};
//4.资金操作
export const amountAction = (rows) => {
  return request({
    url: '/jumpcliuser/amountAction',
    method: 'post',
    data: rows,
  });
};
//团队列表
export const teamPage = (current, size, params) => {
  return request({
    url: '/jumpcliuser/group-user-tree',
    method: 'get',
    timeout: 30000,
    params: {
      ...params,
      current,
      size,
    },
  });
};
//资金流水
export const CapitalLsPage = (current, size, params) => {
  return request({
    url: '/JumpCapitalLs/page',
    method: 'get',
    params: {
      ...params,
      current,
      size,
    },
  });
};
//刷单任务
export const FarmingPage = (current, size, params) => {
  return request({
    url: '/ClickFarming/page',
    method: 'get',
    params: {
      ...params,
      current,
      size,
    },
  });
};
//1.刷单任务
export const FarmingRemove = (ids) => {
  return request({
    url: '/ClickFarming/remove',
    method: 'post',
    params: {
      ids
    }
  });
};
//2.审核
export const FarmingAudit = (params) => {
  return request({
    url: '/ClickFarming/audit',
    method: 'get',
    params
  });
};
//理财购买记录
export const RecordPage = (current, size, params) => {
  return request({
    url: '/PurchaseRecord/page',
    method: 'get',
    params: {
      ...params,
      current,
      size,
    },
  });
};
//1.理财删除
export const RecordRemove = (ids) => {
  return request({
    url: '/PurchaseRecord/remove',
    method: 'post',
    params: {
      ids
    }
  });
};
//抽奖记录
export const cordPage = (current, size, params) => {
  return request({
    url: '/CjRecord/page',
    method: 'get',
    params: {
      ...params,
      current,
      size,
    },
  });
};
//vip信息列表
export const vipPage = (current, size, params) => {
  return request({
    url: '/VipInfo/page',
    method: 'get',
    params: {
      ...params,
      current,
      size,
    },
  });
};
//1.Vip新增
export const vipSave = (rows) => {
  return request({
    url: '/VipInfo/save',
    method: 'post',
    data: rows,
  });
};
//2.Vip修改
export const vipUpdate = (rows) => {
  return request({
    url: '/VipInfo/update',
    method: 'post',
    data: rows,
  });
};
//Vip删除
export const vipRemove = (ids) => {
  return request({
    url: '/VipInfo/remove',
    method: 'post',
    params: {
      ids
    }
  })
}
//参数配置
export const configList = () => {
  return request({
    url: '/jumpcliconfig/list',
    method: 'get',
  });
};
//参数提交
export const configPut = (rows) => {
  return request({
    url: '/jumpcliconfig',
    method: 'put',
    data: rows,
  });
};
//ip监测
export const ipList = (pageNum, pageSize, params) => {
  return request({
    url: '/monitor/logininfor/list',
    method: 'get',
    params: {
      ...params,
      pageNum,
      pageSize,
    },
  });
};
//ip地址禁用
export const ipDisable = (rows) => {
  return request({
    url: '/monitor/logininfor/ipaddr-disable',
    method: 'post',
    data: rows
  })
}
//vip等级
export const pullDown = () => {
  return request({
    url: '/VipInfo/pullDown',
    method: 'get',
  });
};
// 客服配置
export const serrveSave = (rows) => {
  return request({
    url: '/jumpcliconfig/callCenterSave',
    method: 'post',
    data: rows
  });
};
export const callCenterList = () => {
  return request({
    url: 'jumpcliconfig/callCenterListOne',
    method: 'get',
  });
};
export const resetPassword = row => {
  return request({
    url: `/jumpcliuser/reset-password`,
    method: 'post',
    data: row,
  });
};
export const totalAmount = () => {
  return request({
    url: `/PurchaseRecord/total-amount`,
    method: 'get',
  });
};
// 根据字典类型查询字典数据信息
export function getDicts(dictType) {
  return request({
    url: '/system/dict/data/list',
    method: 'get',
    params:{
      dictType,
      pageNum:1,
      pageSize: 999
    }
  })
}
